.class public Lorg/zeam/LauncherModel;
.super Ljava/lang/Object;
.source "LauncherModel.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lorg/zeam/LauncherModel$DesktopItemsLoader;
    }
.end annotation


# static fields
.field static final DEBUG_LOADERS:Z

.field static final LOG_TAG:Ljava/lang/String;

.field private static mLoadApplicationsAsyncTask:Landroid/os/AsyncTask;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Landroid/os/AsyncTask",
            "<",
            "Ljava/lang/Object;",
            "Ljava/util/ArrayList",
            "<",
            "Lorg/zeam/ApplicationItemInfo;",
            ">;",
            "Ljava/util/ArrayList",
            "<",
            "Lorg/zeam/ApplicationItemInfo;",
            ">;>;"
        }
    .end annotation
.end field

.field private static sCachedApplicationItemInfos:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Lorg/zeam/ApplicationItemInfo;",
            ">;"
        }
    .end annotation
.end field

.field private static final sWorkspaceLoaderCount:Ljava/util/concurrent/atomic/AtomicInteger;


# instance fields
.field private mDesktopAppWidgets:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Lorg/zeam/LauncherAppWidgetInfo;",
            ">;"
        }
    .end annotation
.end field

.field private mDesktopColumns:I

.field private mDesktopItems:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Lorg/zeam/ItemInfo;",
            ">;"
        }
    .end annotation
.end field

.field private mDesktopItemsLoaded:Z

.field private mDesktopItemsLoader:Lorg/zeam/LauncherModel$DesktopItemsLoader;

.field private mDesktopLoaderThread:Ljava/lang/Thread;

.field private mDesktopRows:I

.field private mFolders:Ljava/util/HashMap;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/HashMap",
            "<",
            "Ljava/lang/Long;",
            "Lorg/zeam/FolderInfo;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method static constructor <clinit>()V
    .locals 2

    .prologue
    .line 34
    const-class v0, Lorg/zeam/LauncherModel;

    invoke-virtual {v0}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;

    move-result-object v0

    sput-object v0, Lorg/zeam/LauncherModel;->LOG_TAG:Ljava/lang/String;

    .line 180
    new-instance v0, Ljava/util/concurrent/atomic/AtomicInteger;

    const/4 v1, 0x1

    invoke-direct {v0, v1}, Ljava/util/concurrent/atomic/AtomicInteger;-><init>(I)V

    sput-object v0, Lorg/zeam/LauncherModel;->sWorkspaceLoaderCount:Ljava/util/concurrent/atomic/AtomicInteger;

    .line 32
    return-void
.end method

.method public constructor <init>()V
    .locals 0

    .prologue
    .line 32
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method static synthetic access$0()Ljava/util/concurrent/atomic/AtomicInteger;
    .locals 1

    .prologue
    .line 180
    sget-object v0, Lorg/zeam/LauncherModel;->sWorkspaceLoaderCount:Ljava/util/concurrent/atomic/AtomicInteger;

    return-object v0
.end method

.method static synthetic access$1(Landroid/content/pm/PackageManager;Landroid/content/Intent;Landroid/content/Context;)Lorg/zeam/ApplicationItemInfo;
    .locals 1
    .parameter
    .parameter
    .parameter

    .prologue
    .line 713
    invoke-static {p0, p1, p2}, Lorg/zeam/LauncherModel;->getApplicationInfo(Landroid/content/pm/PackageManager;Landroid/content/Intent;Landroid/content/Context;)Lorg/zeam/ApplicationItemInfo;

    move-result-object v0

    return-object v0
.end method

.method static synthetic access$10(Landroid/content/pm/PackageManager;Landroid/content/pm/ActivityInfo;)Ljava/lang/String;
    .locals 1
    .parameter
    .parameter

    .prologue
    .line 225
    invoke-static {p0, p1}, Lorg/zeam/LauncherModel;->getLabel(Landroid/content/pm/PackageManager;Landroid/content/pm/ActivityInfo;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method static synthetic access$11()Ljava/util/ArrayList;
    .locals 1

    .prologue
    .line 60
    sget-object v0, Lorg/zeam/LauncherModel;->sCachedApplicationItemInfos:Ljava/util/ArrayList;

    return-object v0
.end method

.method static synthetic access$12(Ljava/util/ArrayList;)V
    .locals 0
    .parameter

    .prologue
    .line 60
    sput-object p0, Lorg/zeam/LauncherModel;->sCachedApplicationItemInfos:Ljava/util/ArrayList;

    return-void
.end method

.method static synthetic access$2(Lorg/zeam/LauncherModel;Landroid/database/Cursor;Landroid/content/Context;IIII)Lorg/zeam/ApplicationItemInfo;
    .locals 1
    .parameter
    .parameter
    .parameter
    .parameter
    .parameter
    .parameter
    .parameter

    .prologue
    .line 734
    invoke-direct/range {p0 .. p6}, Lorg/zeam/LauncherModel;->getApplicationInfoShortcut(Landroid/database/Cursor;Landroid/content/Context;IIII)Lorg/zeam/ApplicationItemInfo;

    move-result-object v0

    return-object v0
.end method

.method static synthetic access$3(Lorg/zeam/LauncherModel;Ljava/util/HashMap;J)Lorg/zeam/UserFolderInfo;
    .locals 1
    .parameter
    .parameter
    .parameter

    .prologue
    .line 604
    invoke-direct {p0, p1, p2, p3}, Lorg/zeam/LauncherModel;->findOrMakeUserFolder(Ljava/util/HashMap;J)Lorg/zeam/UserFolderInfo;

    move-result-object v0

    return-object v0
.end method

.method static synthetic access$4(Lorg/zeam/LauncherModel;Ljava/util/HashMap;J)Lorg/zeam/LiveFolderInfo;
    .locals 1
    .parameter
    .parameter
    .parameter

    .prologue
    .line 614
    invoke-direct {p0, p1, p2, p3}, Lorg/zeam/LauncherModel;->findOrMakeLiveFolder(Ljava/util/HashMap;J)Lorg/zeam/LiveFolderInfo;

    move-result-object v0

    return-object v0
.end method

.method static synthetic access$5(Lorg/zeam/Launcher;Landroid/database/Cursor;IIILorg/zeam/LiveFolderInfo;)V
    .locals 0
    .parameter
    .parameter
    .parameter
    .parameter
    .parameter
    .parameter

    .prologue
    .line 566
    invoke-static/range {p0 .. p5}, Lorg/zeam/LauncherModel;->loadLiveFolderIcon(Lorg/zeam/Launcher;Landroid/database/Cursor;IIILorg/zeam/LiveFolderInfo;)V

    return-void
.end method

.method static synthetic access$6(Lorg/zeam/LauncherModel;Ljava/util/ArrayList;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 38
    iput-object p1, p0, Lorg/zeam/LauncherModel;->mDesktopItems:Ljava/util/ArrayList;

    return-void
.end method

.method static synthetic access$7(Lorg/zeam/LauncherModel;Ljava/util/ArrayList;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 40
    iput-object p1, p0, Lorg/zeam/LauncherModel;->mDesktopAppWidgets:Ljava/util/ArrayList;

    return-void
.end method

.method static synthetic access$8(Lorg/zeam/LauncherModel;Ljava/util/HashMap;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 39
    iput-object p1, p0, Lorg/zeam/LauncherModel;->mFolders:Ljava/util/HashMap;

    return-void
.end method

.method static synthetic access$9(Lorg/zeam/LauncherModel;Z)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 37
    iput-boolean p1, p0, Lorg/zeam/LauncherModel;->mDesktopItemsLoaded:Z

    return-void
.end method

.method static addItemToDatabase(Landroid/content/Context;Lorg/zeam/ItemInfo;JIIIZ)V
    .locals 5
    .parameter "context"
    .parameter "item"
    .parameter "container"
    .parameter "screen"
    .parameter "cellX"
    .parameter "cellY"
    .parameter "notify"

    .prologue
    .line 892
    iput-wide p2, p1, Lorg/zeam/ItemInfo;->container:J

    .line 893
    iput p4, p1, Lorg/zeam/ItemInfo;->screen:I

    .line 894
    iput p5, p1, Lorg/zeam/ItemInfo;->cellX:I

    .line 895
    iput p6, p1, Lorg/zeam/ItemInfo;->cellY:I

    .line 897
    new-instance v2, Landroid/content/ContentValues;

    invoke-direct {v2}, Landroid/content/ContentValues;-><init>()V

    .line 898
    .local v2, values:Landroid/content/ContentValues;
    invoke-virtual {p0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    .line 900
    .local v0, contentResolver:Landroid/content/ContentResolver;
    invoke-virtual {p1, v2}, Lorg/zeam/ItemInfo;->onAddToDatabase(Landroid/content/ContentValues;)V

    .line 901
    if-eqz p7, :cond_1

    sget-object v3, Lorg/zeam/LauncherSettings$Favorites;->CONTENT_URI:Landroid/net/Uri;

    :goto_0
    invoke-virtual {v0, v3, v2}, Landroid/content/ContentResolver;->insert(Landroid/net/Uri;Landroid/content/ContentValues;)Landroid/net/Uri;

    move-result-object v1

    .line 903
    .local v1, result:Landroid/net/Uri;
    if-eqz v1, :cond_0

    .line 904
    invoke-virtual {v1}, Landroid/net/Uri;->getPathSegments()Ljava/util/List;

    move-result-object v3

    const/4 v4, 0x1

    invoke-interface {v3, v4}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object p0

    .end local p0
    check-cast p0, Ljava/lang/String;

    invoke-static {p0}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v3

    int-to-long v3, v3

    iput-wide v3, p1, Lorg/zeam/ItemInfo;->id:J

    .line 906
    :cond_0
    return-void

    .line 902
    .end local v1           #result:Landroid/net/Uri;
    .restart local p0
    :cond_1
    sget-object v3, Lorg/zeam/LauncherSettings$Favorites;->CONTENT_URI_NO_NOTIFICATION:Landroid/net/Uri;

    goto :goto_0
.end method

.method private addOccupiedCells([[ZILorg/zeam/ItemInfo;)V
    .locals 4
    .parameter "occupied"
    .parameter "screen"
    .parameter "item"

    .prologue
    .line 683
    iget v2, p3, Lorg/zeam/ItemInfo;->screen:I

    if-ne v2, p2, :cond_0

    .line 684
    iget v0, p3, Lorg/zeam/ItemInfo;->cellX:I

    .local v0, xx:I
    :goto_0
    iget v2, p3, Lorg/zeam/ItemInfo;->cellX:I

    iget v3, p3, Lorg/zeam/ItemInfo;->spanX:I

    add-int/2addr v2, v3

    if-lt v0, v2, :cond_1

    .line 691
    .end local v0           #xx:I
    :cond_0
    return-void

    .line 685
    .restart local v0       #xx:I
    :cond_1
    iget v1, p3, Lorg/zeam/ItemInfo;->cellY:I

    .local v1, yy:I
    :goto_1
    iget v2, p3, Lorg/zeam/ItemInfo;->cellY:I

    iget v3, p3, Lorg/zeam/ItemInfo;->spanY:I

    add-int/2addr v2, v3

    if-lt v1, v2, :cond_2

    .line 684
    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    .line 686
    :cond_2
    iget v2, p0, Lorg/zeam/LauncherModel;->mDesktopColumns:I

    if-ge v0, v2, :cond_3

    iget v2, p0, Lorg/zeam/LauncherModel;->mDesktopRows:I

    if-ge v1, v2, :cond_3

    .line 687
    aget-object v2, p1, v0

    const/4 v3, 0x1

    aput-boolean v3, v2, v1

    .line 685
    :cond_3
    add-int/lit8 v1, v1, 0x1

    goto :goto_1
.end method

.method static addOrMoveItemInDatabase(Landroid/content/Context;Lorg/zeam/ItemInfo;JIII)V
    .locals 8
    .parameter "context"
    .parameter "item"
    .parameter "container"
    .parameter "screen"
    .parameter "cellX"
    .parameter "cellY"

    .prologue
    .line 797
    iget-wide v0, p1, Lorg/zeam/ItemInfo;->container:J

    const-wide/16 v2, -0x1

    cmp-long v0, v0, v2

    if-nez v0, :cond_0

    .line 798
    const/4 v7, 0x0

    move-object v0, p0

    move-object v1, p1

    move-wide v2, p2

    move v4, p4

    move v5, p5

    move v6, p6

    invoke-static/range {v0 .. v7}, Lorg/zeam/LauncherModel;->addItemToDatabase(Landroid/content/Context;Lorg/zeam/ItemInfo;JIIIZ)V

    .line 802
    :goto_0
    return-void

    .line 800
    :cond_0
    invoke-static/range {p0 .. p6}, Lorg/zeam/LauncherModel;->moveItemInDatabase(Landroid/content/Context;Lorg/zeam/ItemInfo;JIII)V

    goto :goto_0
.end method

.method static deleteItemFromDatabase(Landroid/content/Context;Lorg/zeam/ItemInfo;)V
    .locals 5
    .parameter "context"
    .parameter "item"

    .prologue
    const/4 v4, 0x0

    .line 919
    invoke-virtual {p0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    .line 920
    .local v0, contentResolver:Landroid/content/ContentResolver;
    iget-wide v1, p1, Lorg/zeam/ItemInfo;->id:J

    const/4 v3, 0x0

    invoke-static {v1, v2, v3}, Lorg/zeam/LauncherSettings$Favorites;->getContentUri(JZ)Landroid/net/Uri;

    move-result-object v1

    invoke-virtual {v0, v1, v4, v4}, Landroid/content/ContentResolver;->delete(Landroid/net/Uri;Ljava/lang/String;[Ljava/lang/String;)I

    .line 921
    return-void
.end method

.method static deleteUserFolderContentsFromDatabase(Landroid/content/Context;Lorg/zeam/UserFolderInfo;)V
    .locals 6
    .parameter "context"
    .parameter "info"

    .prologue
    const/4 v5, 0x0

    .line 925
    invoke-virtual {p0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    .line 926
    .local v0, contentResolver:Landroid/content/ContentResolver;
    iget-wide v1, p1, Lorg/zeam/UserFolderInfo;->id:J

    const/4 v3, 0x0

    invoke-static {v1, v2, v3}, Lorg/zeam/LauncherSettings$Favorites;->getContentUri(JZ)Landroid/net/Uri;

    move-result-object v1

    invoke-virtual {v0, v1, v5, v5}, Landroid/content/ContentResolver;->delete(Landroid/net/Uri;Ljava/lang/String;[Ljava/lang/String;)I

    .line 927
    sget-object v1, Lorg/zeam/LauncherSettings$Favorites;->CONTENT_URI:Landroid/net/Uri;

    .line 928
    new-instance v2, Ljava/lang/StringBuilder;

    const-string v3, "container="

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-wide v3, p1, Lorg/zeam/UserFolderInfo;->id:J

    invoke-virtual {v2, v3, v4}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    .line 927
    invoke-virtual {v0, v1, v2, v5}, Landroid/content/ContentResolver;->delete(Landroid/net/Uri;Ljava/lang/String;[Ljava/lang/String;)I

    .line 929
    return-void
.end method

.method private findOrMakeLiveFolder(Ljava/util/HashMap;J)Lorg/zeam/LiveFolderInfo;
    .locals 2
    .parameter
    .parameter "id"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/HashMap",
            "<",
            "Ljava/lang/Long;",
            "Lorg/zeam/FolderInfo;",
            ">;J)",
            "Lorg/zeam/LiveFolderInfo;"
        }
    .end annotation

    .prologue
    .line 616
    .local p1, folders:Ljava/util/HashMap;,"Ljava/util/HashMap<Ljava/lang/Long;Lorg/zeam/FolderInfo;>;"
    invoke-static {p2, p3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v1

    invoke-virtual {p1, v1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lorg/zeam/FolderInfo;

    .line 617
    .local v0, folderInfo:Lorg/zeam/FolderInfo;
    if-eqz v0, :cond_0

    instance-of v1, v0, Lorg/zeam/LiveFolderInfo;

    if-nez v1, :cond_1

    .line 618
    :cond_0
    new-instance v0, Lorg/zeam/LiveFolderInfo;

    .end local v0           #folderInfo:Lorg/zeam/FolderInfo;
    invoke-direct {v0}, Lorg/zeam/LiveFolderInfo;-><init>()V

    .line 619
    .restart local v0       #folderInfo:Lorg/zeam/FolderInfo;
    invoke-static {p2, p3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v1

    invoke-virtual {p1, v1, v0}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 621
    :cond_1
    check-cast v0, Lorg/zeam/LiveFolderInfo;

    .end local v0           #folderInfo:Lorg/zeam/FolderInfo;
    return-object v0
.end method

.method private findOrMakeUserFolder(Ljava/util/HashMap;J)Lorg/zeam/UserFolderInfo;
    .locals 2
    .parameter
    .parameter "id"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/HashMap",
            "<",
            "Ljava/lang/Long;",
            "Lorg/zeam/FolderInfo;",
            ">;J)",
            "Lorg/zeam/UserFolderInfo;"
        }
    .end annotation

    .prologue
    .line 606
    .local p1, folders:Ljava/util/HashMap;,"Ljava/util/HashMap<Ljava/lang/Long;Lorg/zeam/FolderInfo;>;"
    invoke-static {p2, p3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v1

    invoke-virtual {p1, v1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lorg/zeam/FolderInfo;

    .line 607
    .local v0, folderInfo:Lorg/zeam/FolderInfo;
    if-eqz v0, :cond_0

    instance-of v1, v0, Lorg/zeam/UserFolderInfo;

    if-nez v1, :cond_1

    .line 608
    :cond_0
    new-instance v0, Lorg/zeam/UserFolderInfo;

    .end local v0           #folderInfo:Lorg/zeam/FolderInfo;
    invoke-direct {v0}, Lorg/zeam/UserFolderInfo;-><init>()V

    .line 609
    .restart local v0       #folderInfo:Lorg/zeam/FolderInfo;
    invoke-static {p2, p3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v1

    invoke-virtual {p1, v1, v0}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 611
    :cond_1
    check-cast v0, Lorg/zeam/UserFolderInfo;

    .end local v0           #folderInfo:Lorg/zeam/FolderInfo;
    return-object v0
.end method

.method private static getApplicationInfo(Landroid/content/pm/PackageManager;Landroid/content/Intent;Landroid/content/Context;)Lorg/zeam/ApplicationItemInfo;
    .locals 5
    .parameter "packageManager"
    .parameter "intent"
    .parameter "context"

    .prologue
    const/4 v4, 0x0

    .line 717
    invoke-virtual {p0, p1, v4}, Landroid/content/pm/PackageManager;->resolveActivity(Landroid/content/Intent;I)Landroid/content/pm/ResolveInfo;

    move-result-object v2

    .line 718
    .local v2, resolveInfo:Landroid/content/pm/ResolveInfo;
    if-nez v2, :cond_0

    .line 719
    const/4 v3, 0x0

    .line 731
    :goto_0
    return-object v3

    .line 721
    :cond_0
    new-instance v1, Lorg/zeam/ApplicationItemInfo;

    invoke-direct {v1}, Lorg/zeam/ApplicationItemInfo;-><init>()V

    .line 722
    .local v1, applicationItemInfo:Lorg/zeam/ApplicationItemInfo;
    iget-object v0, v2, Landroid/content/pm/ResolveInfo;->activityInfo:Landroid/content/pm/ActivityInfo;

    .line 723
    .local v0, activityInfo:Landroid/content/pm/ActivityInfo;
    invoke-virtual {v0, p0}, Landroid/content/pm/ActivityInfo;->loadIcon(Landroid/content/pm/PackageManager;)Landroid/graphics/drawable/Drawable;

    move-result-object v3

    invoke-static {v3, p2}, Lorg/zeam/Utilities;->createIconThumbnail(Landroid/graphics/drawable/Drawable;Landroid/content/Context;)Landroid/graphics/drawable/Drawable;

    move-result-object v3

    iput-object v3, v1, Lorg/zeam/ApplicationItemInfo;->icon:Landroid/graphics/drawable/Drawable;

    .line 724
    iget-object v3, v1, Lorg/zeam/ApplicationItemInfo;->title:Ljava/lang/CharSequence;

    if-eqz v3, :cond_1

    iget-object v3, v1, Lorg/zeam/ApplicationItemInfo;->title:Ljava/lang/CharSequence;

    invoke-interface {v3}, Ljava/lang/CharSequence;->length()I

    move-result v3

    if-nez v3, :cond_2

    .line 725
    :cond_1
    invoke-virtual {v0, p0}, Landroid/content/pm/ActivityInfo;->loadLabel(Landroid/content/pm/PackageManager;)Ljava/lang/CharSequence;

    move-result-object v3

    iput-object v3, v1, Lorg/zeam/ApplicationItemInfo;->title:Ljava/lang/CharSequence;

    .line 727
    :cond_2
    iget-object v3, v1, Lorg/zeam/ApplicationItemInfo;->title:Ljava/lang/CharSequence;

    if-nez v3, :cond_3

    .line 728
    const-string v3, ""

    iput-object v3, v1, Lorg/zeam/ApplicationItemInfo;->title:Ljava/lang/CharSequence;

    .line 730
    :cond_3
    iput v4, v1, Lorg/zeam/ApplicationItemInfo;->itemType:I

    move-object v3, v1

    .line 731
    goto :goto_0
.end method

.method private getApplicationInfoShortcut(Landroid/database/Cursor;Landroid/content/Context;IIII)Lorg/zeam/ApplicationItemInfo;
    .locals 14
    .parameter "cursor"
    .parameter "context"
    .parameter "iconTypeIndex"
    .parameter "iconPackageIndex"
    .parameter "iconResourceIndex"
    .parameter "iconIndex"

    .prologue
    .line 741
    new-instance v2, Lorg/zeam/ApplicationItemInfo;

    invoke-direct {v2}, Lorg/zeam/ApplicationItemInfo;-><init>()V

    .line 742
    .local v2, applicationItemInfo:Lorg/zeam/ApplicationItemInfo;
    const/4 v12, 0x1

    iput v12, v2, Lorg/zeam/ApplicationItemInfo;->itemType:I

    .line 743
    move-object v0, p1

    move/from16 v1, p3

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getInt(I)I

    move-result v6

    .line 745
    .local v6, iconType:I
    packed-switch v6, :pswitch_data_0

    .line 775
    invoke-virtual/range {p2 .. p2}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v12

    invoke-virtual {v12}, Landroid/content/pm/PackageManager;->getDefaultActivityIcon()Landroid/graphics/drawable/Drawable;

    move-result-object v12

    iput-object v12, v2, Lorg/zeam/ApplicationItemInfo;->icon:Landroid/graphics/drawable/Drawable;

    .line 776
    const/4 v12, 0x0

    iput-boolean v12, v2, Lorg/zeam/ApplicationItemInfo;->customIcon:Z

    .line 779
    :goto_0
    return-object v2

    .line 747
    :pswitch_0
    move-object v0, p1

    move/from16 v1, p4

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v9

    .line 748
    .local v9, packageName:Ljava/lang/String;
    move-object v0, p1

    move/from16 v1, p5

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v10

    .line 749
    .local v10, resourceName:Ljava/lang/String;
    invoke-virtual/range {p2 .. p2}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v8

    .line 751
    .local v8, packageManager:Landroid/content/pm/PackageManager;
    :try_start_0
    invoke-virtual {v8, v9}, Landroid/content/pm/PackageManager;->getResourcesForApplication(Ljava/lang/String;)Landroid/content/res/Resources;

    move-result-object v11

    .line 752
    .local v11, resources:Landroid/content/res/Resources;
    const/4 v12, 0x0

    const/4 v13, 0x0

    invoke-virtual {v11, v10, v12, v13}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I

    move-result v7

    .line 753
    .local v7, id:I
    invoke-virtual {v11, v7}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v12

    move-object v0, v12

    move-object/from16 v1, p2

    invoke-static {v0, v1}, Lorg/zeam/Utilities;->createIconThumbnail(Landroid/graphics/drawable/Drawable;Landroid/content/Context;)Landroid/graphics/drawable/Drawable;

    move-result-object v12

    iput-object v12, v2, Lorg/zeam/ApplicationItemInfo;->icon:Landroid/graphics/drawable/Drawable;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 757
    .end local v7           #id:I
    .end local v11           #resources:Landroid/content/res/Resources;
    :goto_1
    new-instance v12, Landroid/content/Intent$ShortcutIconResource;

    invoke-direct {v12}, Landroid/content/Intent$ShortcutIconResource;-><init>()V

    iput-object v12, v2, Lorg/zeam/ApplicationItemInfo;->iconResource:Landroid/content/Intent$ShortcutIconResource;

    .line 758
    iget-object v12, v2, Lorg/zeam/ApplicationItemInfo;->iconResource:Landroid/content/Intent$ShortcutIconResource;

    iput-object v9, v12, Landroid/content/Intent$ShortcutIconResource;->packageName:Ljava/lang/String;

    .line 759
    iget-object v12, v2, Lorg/zeam/ApplicationItemInfo;->iconResource:Landroid/content/Intent$ShortcutIconResource;

    iput-object v10, v12, Landroid/content/Intent$ShortcutIconResource;->resourceName:Ljava/lang/String;

    .line 760
    const/4 v12, 0x0

    iput-boolean v12, v2, Lorg/zeam/ApplicationItemInfo;->customIcon:Z

    goto :goto_0

    .line 754
    :catch_0
    move-exception v12

    move-object v5, v12

    .line 755
    .local v5, e:Ljava/lang/Exception;
    invoke-virtual {v8}, Landroid/content/pm/PackageManager;->getDefaultActivityIcon()Landroid/graphics/drawable/Drawable;

    move-result-object v12

    iput-object v12, v2, Lorg/zeam/ApplicationItemInfo;->icon:Landroid/graphics/drawable/Drawable;

    goto :goto_1

    .line 763
    .end local v5           #e:Ljava/lang/Exception;
    .end local v8           #packageManager:Landroid/content/pm/PackageManager;
    .end local v9           #packageName:Ljava/lang/String;
    .end local v10           #resourceName:Ljava/lang/String;
    :pswitch_1
    move-object v0, p1

    move/from16 v1, p6

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getBlob(I)[B

    move-result-object v4

    .line 765
    .local v4, data:[B
    const/4 v12, 0x0

    :try_start_1
    array-length v13, v4

    invoke-static {v4, v12, v13}, Landroid/graphics/BitmapFactory;->decodeByteArray([BII)Landroid/graphics/Bitmap;

    move-result-object v3

    .line 766
    .local v3, bitmap:Landroid/graphics/Bitmap;
    new-instance v12, Lorg/zeam/FastBitmapDrawable;

    move-object v0, v3

    move-object/from16 v1, p2

    invoke-static {v0, v1}, Lorg/zeam/Utilities;->createBitmapThumbnail(Landroid/graphics/Bitmap;Landroid/content/Context;)Landroid/graphics/Bitmap;

    move-result-object v13

    invoke-direct {v12, v13}, Lorg/zeam/FastBitmapDrawable;-><init>(Landroid/graphics/Bitmap;)V

    iput-object v12, v2, Lorg/zeam/ApplicationItemInfo;->icon:Landroid/graphics/drawable/Drawable;
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_1

    .line 771
    .end local v3           #bitmap:Landroid/graphics/Bitmap;
    :goto_2
    const/4 v12, 0x1

    iput-boolean v12, v2, Lorg/zeam/ApplicationItemInfo;->filtered:Z

    .line 772
    const/4 v12, 0x1

    iput-boolean v12, v2, Lorg/zeam/ApplicationItemInfo;->customIcon:Z

    goto :goto_0

    .line 767
    :catch_1
    move-exception v12

    move-object v5, v12

    .line 768
    .restart local v5       #e:Ljava/lang/Exception;
    invoke-virtual/range {p2 .. p2}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v8

    .line 769
    .restart local v8       #packageManager:Landroid/content/pm/PackageManager;
    invoke-virtual {v8}, Landroid/content/pm/PackageManager;->getDefaultActivityIcon()Landroid/graphics/drawable/Drawable;

    move-result-object v12

    iput-object v12, v2, Lorg/zeam/ApplicationItemInfo;->icon:Landroid/graphics/drawable/Drawable;

    goto :goto_2

    .line 745
    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_1
    .end packed-switch
.end method

.method private static getLabel(Landroid/content/pm/PackageManager;Landroid/content/pm/ActivityInfo;)Ljava/lang/String;
    .locals 2
    .parameter "manager"
    .parameter "activityInfo"

    .prologue
    .line 227
    invoke-virtual {p1, p0}, Landroid/content/pm/ActivityInfo;->loadLabel(Landroid/content/pm/PackageManager;)Ljava/lang/CharSequence;

    move-result-object v1

    invoke-interface {v1}, Ljava/lang/CharSequence;->toString()Ljava/lang/String;

    move-result-object v0

    .line 228
    .local v0, label:Ljava/lang/String;
    if-nez v0, :cond_0

    .line 229
    iget-object v1, p1, Landroid/content/pm/ActivityInfo;->applicationInfo:Landroid/content/pm/ApplicationInfo;

    invoke-virtual {p0, v1}, Landroid/content/pm/PackageManager;->getApplicationLabel(Landroid/content/pm/ApplicationInfo;)Ljava/lang/CharSequence;

    move-result-object v1

    invoke-interface {v1}, Ljava/lang/CharSequence;->toString()Ljava/lang/String;

    move-result-object v0

    .line 230
    if-nez v0, :cond_0

    .line 231
    iget-object v0, p1, Landroid/content/pm/ActivityInfo;->name:Ljava/lang/String;

    .line 234
    :cond_0
    return-object v0
.end method

.method private static loadLiveFolderIcon(Lorg/zeam/Launcher;Landroid/database/Cursor;IIILorg/zeam/LiveFolderInfo;)V
    .locals 10
    .parameter "launcher"
    .parameter "cursor"
    .parameter "iconTypeIndex"
    .parameter "iconPackageIndex"
    .parameter "iconResourceIndex"
    .parameter "liveFolderInfo"

    .prologue
    const v9, 0x7f020011

    .line 573
    invoke-interface {p1, p2}, Landroid/database/Cursor;->getInt(I)I

    move-result v1

    .line 574
    .local v1, iconType:I
    packed-switch v1, :pswitch_data_0

    .line 592
    invoke-virtual {p0}, Lorg/zeam/Launcher;->getResources()Landroid/content/res/Resources;

    move-result-object v7

    invoke-virtual {v7, v9}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v7

    iput-object v7, p5, Lorg/zeam/LiveFolderInfo;->icon:Landroid/graphics/drawable/Drawable;

    .line 594
    :goto_0
    return-void

    .line 577
    :pswitch_0
    invoke-interface {p1, p3}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v4

    .line 578
    .local v4, packageName:Ljava/lang/String;
    invoke-interface {p1, p4}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v5

    .line 579
    .local v5, resourceName:Ljava/lang/String;
    invoke-virtual {p0}, Lorg/zeam/Launcher;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v3

    .line 581
    .local v3, packageManager:Landroid/content/pm/PackageManager;
    :try_start_0
    invoke-virtual {v3, v4}, Landroid/content/pm/PackageManager;->getResourcesForApplication(Ljava/lang/String;)Landroid/content/res/Resources;

    move-result-object v6

    .line 582
    .local v6, resources:Landroid/content/res/Resources;
    const/4 v7, 0x0

    const/4 v8, 0x0

    invoke-virtual {v6, v5, v7, v8}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I

    move-result v2

    .line 583
    .local v2, id:I
    invoke-virtual {v6, v2}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v7

    iput-object v7, p5, Lorg/zeam/LiveFolderInfo;->icon:Landroid/graphics/drawable/Drawable;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 587
    .end local v2           #id:I
    .end local v6           #resources:Landroid/content/res/Resources;
    :goto_1
    new-instance v7, Landroid/content/Intent$ShortcutIconResource;

    invoke-direct {v7}, Landroid/content/Intent$ShortcutIconResource;-><init>()V

    iput-object v7, p5, Lorg/zeam/LiveFolderInfo;->iconResource:Landroid/content/Intent$ShortcutIconResource;

    .line 588
    iget-object v7, p5, Lorg/zeam/LiveFolderInfo;->iconResource:Landroid/content/Intent$ShortcutIconResource;

    iput-object v4, v7, Landroid/content/Intent$ShortcutIconResource;->packageName:Ljava/lang/String;

    .line 589
    iget-object v7, p5, Lorg/zeam/LiveFolderInfo;->iconResource:Landroid/content/Intent$ShortcutIconResource;

    iput-object v5, v7, Landroid/content/Intent$ShortcutIconResource;->resourceName:Ljava/lang/String;

    goto :goto_0

    .line 584
    :catch_0
    move-exception v7

    move-object v0, v7

    .line 585
    .local v0, e:Ljava/lang/Exception;
    invoke-virtual {p0}, Lorg/zeam/Launcher;->getResources()Landroid/content/res/Resources;

    move-result-object v7

    invoke-virtual {v7, v9}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v7

    iput-object v7, p5, Lorg/zeam/LiveFolderInfo;->icon:Landroid/graphics/drawable/Drawable;

    goto :goto_1

    .line 574
    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
    .end packed-switch
.end method

.method static moveItemInDatabase(Landroid/content/Context;Lorg/zeam/ItemInfo;JIII)V
    .locals 6
    .parameter "context"
    .parameter "item"
    .parameter "container"
    .parameter "screen"
    .parameter "cellX"
    .parameter "cellY"

    .prologue
    const/4 v5, 0x0

    .line 811
    iput-wide p2, p1, Lorg/zeam/ItemInfo;->container:J

    .line 812
    iput p4, p1, Lorg/zeam/ItemInfo;->screen:I

    .line 813
    iput p5, p1, Lorg/zeam/ItemInfo;->cellX:I

    .line 814
    iput p6, p1, Lorg/zeam/ItemInfo;->cellY:I

    .line 816
    new-instance v1, Landroid/content/ContentValues;

    invoke-direct {v1}, Landroid/content/ContentValues;-><init>()V

    .line 817
    .local v1, values:Landroid/content/ContentValues;
    invoke-virtual {p0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    .line 819
    .local v0, contentResolver:Landroid/content/ContentResolver;
    const-string v2, "container"

    iget-wide v3, p1, Lorg/zeam/ItemInfo;->container:J

    invoke-static {v3, v4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v3

    invoke-virtual {v1, v2, v3}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Long;)V

    .line 820
    const-string v2, "cellX"

    iget v3, p1, Lorg/zeam/ItemInfo;->cellX:I

    invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v3

    invoke-virtual {v1, v2, v3}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Integer;)V

    .line 821
    const-string v2, "cellY"

    iget v3, p1, Lorg/zeam/ItemInfo;->cellY:I

    invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v3

    invoke-virtual {v1, v2, v3}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Integer;)V

    .line 822
    const-string v2, "screen"

    iget v3, p1, Lorg/zeam/ItemInfo;->screen:I

    invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v3

    invoke-virtual {v1, v2, v3}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Integer;)V

    .line 824
    iget-wide v2, p1, Lorg/zeam/ItemInfo;->id:J

    const/4 v4, 0x0

    invoke-static {v2, v3, v4}, Lorg/zeam/LauncherSettings$Favorites;->getContentUri(JZ)Landroid/net/Uri;

    move-result-object v2

    invoke-virtual {v0, v2, v1, v5, v5}, Landroid/content/ContentResolver;->update(Landroid/net/Uri;Landroid/content/ContentValues;Ljava/lang/String;[Ljava/lang/String;)I

    .line 825
    return-void
.end method

.method static shortcutExists(Landroid/content/Context;Ljava/lang/String;Landroid/content/Intent;)Z
    .locals 9
    .parameter "context"
    .parameter "title"
    .parameter "intent"

    .prologue
    const/4 v4, 0x2

    const/4 v8, 0x1

    const/4 v5, 0x0

    .line 829
    invoke-virtual {p0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    .line 830
    .local v0, contentResolver:Landroid/content/ContentResolver;
    sget-object v1, Lorg/zeam/LauncherSettings$Favorites;->CONTENT_URI:Landroid/net/Uri;

    .line 831
    new-array v2, v4, [Ljava/lang/String;

    const-string v3, "title"

    aput-object v3, v2, v5

    const-string v3, "intent"

    aput-object v3, v2, v8

    const-string v3, "title=? and intent=?"

    .line 832
    new-array v4, v4, [Ljava/lang/String;

    aput-object p1, v4, v5

    invoke-virtual {p2, v5}, Landroid/content/Intent;->toUri(I)Ljava/lang/String;

    move-result-object v5

    aput-object v5, v4, v8

    const/4 v5, 0x0

    .line 830
    invoke-virtual/range {v0 .. v5}, Landroid/content/ContentResolver;->query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v6

    .line 834
    .local v6, cursor:Landroid/database/Cursor;
    const/4 v7, 0x0

    .line 836
    .local v7, result:Z
    :try_start_0
    invoke-interface {v6}, Landroid/database/Cursor;->moveToFirst()Z
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    move-result v7

    .line 838
    invoke-interface {v6}, Landroid/database/Cursor;->close()V

    .line 840
    return v7

    .line 837
    :catchall_0
    move-exception v1

    .line 838
    invoke-interface {v6}, Landroid/database/Cursor;->close()V

    .line 839
    throw v1
.end method

.method private unbindAppWidgetHostViews(Ljava/util/ArrayList;)V
    .locals 4
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/ArrayList",
            "<",
            "Lorg/zeam/LauncherAppWidgetInfo;",
            ">;)V"
        }
    .end annotation

    .prologue
    .line 648
    .local p1, appWidgets:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lorg/zeam/LauncherAppWidgetInfo;>;"
    if-eqz p1, :cond_0

    .line 649
    invoke-virtual {p1}, Ljava/util/ArrayList;->size()I

    move-result v0

    .line 650
    .local v0, count:I
    const/4 v1, 0x0

    .local v1, i:I
    :goto_0
    if-lt v1, v0, :cond_1

    .line 655
    .end local v0           #count:I
    .end local v1           #i:I
    :cond_0
    return-void

    .line 651
    .restart local v0       #count:I
    .restart local v1       #i:I
    :cond_1
    invoke-virtual {p1, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lorg/zeam/LauncherAppWidgetInfo;

    .line 652
    .local v2, launcherInfo:Lorg/zeam/LauncherAppWidgetInfo;
    const/4 v3, 0x0

    iput-object v3, v2, Lorg/zeam/LauncherAppWidgetInfo;->hostView:Landroid/appwidget/AppWidgetHostView;

    .line 650
    add-int/lit8 v1, v1, 0x1

    goto :goto_0
.end method

.method private unbindDrawables(Ljava/util/ArrayList;)V
    .locals 5
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/ArrayList",
            "<",
            "Lorg/zeam/ItemInfo;",
            ">;)V"
        }
    .end annotation

    .prologue
    .line 632
    .local p1, desktopItems:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lorg/zeam/ItemInfo;>;"
    if-eqz p1, :cond_0

    .line 633
    invoke-virtual {p1}, Ljava/util/ArrayList;->size()I

    move-result v0

    .line 634
    .local v0, count:I
    const/4 v1, 0x0

    .local v1, i:I
    :goto_0
    if-lt v1, v0, :cond_1

    .line 644
    .end local v0           #count:I
    .end local v1           #i:I
    :cond_0
    return-void

    .line 635
    .restart local v0       #count:I
    .restart local v1       #i:I
    :cond_1
    invoke-virtual {p1, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lorg/zeam/ItemInfo;

    .line 636
    .local v2, item:Lorg/zeam/ItemInfo;
    iget v3, v2, Lorg/zeam/ItemInfo;->itemType:I

    packed-switch v3, :pswitch_data_0

    .line 634
    .end local v2           #item:Lorg/zeam/ItemInfo;
    :goto_1
    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    .line 639
    .restart local v2       #item:Lorg/zeam/ItemInfo;
    :pswitch_0
    check-cast v2, Lorg/zeam/ApplicationItemInfo;

    .end local v2           #item:Lorg/zeam/ItemInfo;
    iget-object v3, v2, Lorg/zeam/ApplicationItemInfo;->icon:Landroid/graphics/drawable/Drawable;

    const/4 v4, 0x0

    invoke-virtual {v3, v4}, Landroid/graphics/drawable/Drawable;->setCallback(Landroid/graphics/drawable/Drawable$Callback;)V

    goto :goto_1

    .line 636
    nop

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_0
    .end packed-switch
.end method

.method static declared-synchronized updateItemInDatabase(Landroid/content/Context;Lorg/zeam/ItemInfo;)V
    .locals 6
    .parameter "context"
    .parameter "item"

    .prologue
    .line 910
    const-class v2, Lorg/zeam/LauncherModel;

    monitor-enter v2

    :try_start_0
    new-instance v1, Landroid/content/ContentValues;

    invoke-direct {v1}, Landroid/content/ContentValues;-><init>()V

    .line 911
    .local v1, values:Landroid/content/ContentValues;
    invoke-virtual {p0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    .line 913
    .local v0, contentResolver:Landroid/content/ContentResolver;
    invoke-virtual {p1, v1}, Lorg/zeam/ItemInfo;->onAddToDatabase(Landroid/content/ContentValues;)V

    .line 914
    iget-wide v3, p1, Lorg/zeam/ItemInfo;->id:J

    const/4 v5, 0x0

    invoke-static {v3, v4, v5}, Lorg/zeam/LauncherSettings$Favorites;->getContentUri(JZ)Landroid/net/Uri;

    move-result-object v3

    const/4 v4, 0x0

    const/4 v5, 0x0

    invoke-virtual {v0, v3, v1, v4, v5}, Landroid/content/ContentResolver;->update(Landroid/net/Uri;Landroid/content/ContentValues;Ljava/lang/String;[Ljava/lang/String;)I
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 915
    monitor-exit v2

    return-void

    .line 910
    .end local v0           #contentResolver:Landroid/content/ContentResolver;
    .end local v1           #values:Landroid/content/ContentValues;
    :catchall_0
    move-exception v3

    monitor-exit v2

    throw v3
.end method


# virtual methods
.method declared-synchronized abortLoaders()V
    .locals 1

    .prologue
    .line 51
    monitor-enter p0

    :try_start_0
    iget-object v0, p0, Lorg/zeam/LauncherModel;->mDesktopItemsLoader:Lorg/zeam/LauncherModel$DesktopItemsLoader;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lorg/zeam/LauncherModel;->mDesktopItemsLoader:Lorg/zeam/LauncherModel$DesktopItemsLoader;

    invoke-virtual {v0}, Lorg/zeam/LauncherModel$DesktopItemsLoader;->isRunning()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 55
    iget-object v0, p0, Lorg/zeam/LauncherModel;->mDesktopItemsLoader:Lorg/zeam/LauncherModel$DesktopItemsLoader;

    invoke-virtual {v0}, Lorg/zeam/LauncherModel$DesktopItemsLoader;->stop()V

    .line 56
    const/4 v0, 0x0

    iput-boolean v0, p0, Lorg/zeam/LauncherModel;->mDesktopItemsLoaded:Z
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 58
    :cond_0
    monitor-exit p0

    return-void

    .line 51
    :catchall_0
    move-exception v0

    monitor-exit p0

    throw v0
.end method

.method addDesktopAppWidget(Lorg/zeam/LauncherAppWidgetInfo;)V
    .locals 1
    .parameter "info"

    .prologue
    .line 704
    invoke-virtual {p0}, Lorg/zeam/LauncherModel;->isDesktopLoaded()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 705
    iget-object v0, p0, Lorg/zeam/LauncherModel;->mDesktopAppWidgets:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 707
    :cond_0
    return-void
.end method

.method addDesktopItem(Lorg/zeam/ItemInfo;)V
    .locals 1
    .parameter "info"

    .prologue
    .line 694
    invoke-virtual {p0}, Lorg/zeam/LauncherModel;->isDesktopLoaded()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 695
    iget-object v0, p0, Lorg/zeam/LauncherModel;->mDesktopItems:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 697
    :cond_0
    return-void
.end method

.method addFolder(Lorg/zeam/FolderInfo;)V
    .locals 3
    .parameter "info"

    .prologue
    .line 601
    iget-object v0, p0, Lorg/zeam/LauncherModel;->mFolders:Ljava/util/HashMap;

    iget-wide v1, p1, Lorg/zeam/FolderInfo;->id:J

    invoke-static {v1, v2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v1

    invoke-virtual {v0, v1, p1}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 602
    return-void
.end method

.method declared-synchronized addPackage(Lorg/zeam/ApplicationsView;Ljava/lang/String;)V
    .locals 1
    .parameter "applicationsView"
    .parameter "packageName"

    .prologue
    .line 155
    monitor-enter p0

    :try_start_0
    invoke-virtual {p0, p1}, Lorg/zeam/LauncherModel;->loadApplications(Lorg/zeam/ApplicationsView;)V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 156
    monitor-exit p0

    return-void

    .line 155
    :catchall_0
    move-exception v0

    monitor-exit p0

    throw v0
.end method

.method findAllOccupiedCells([[ZIII)V
    .locals 7
    .parameter "occupied"
    .parameter "countX"
    .parameter "countY"
    .parameter "screen"

    .prologue
    const/4 v6, 0x1

    .line 659
    iget-object v2, p0, Lorg/zeam/LauncherModel;->mDesktopItems:Ljava/util/ArrayList;

    .line 660
    .local v2, desktopItems:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lorg/zeam/ItemInfo;>;"
    if-eqz v2, :cond_0

    .line 661
    invoke-virtual {v2}, Ljava/util/ArrayList;->size()I

    move-result v0

    .line 662
    .local v0, count:I
    const/4 v3, 0x0

    .local v3, i:I
    :goto_0
    if-lt v3, v0, :cond_2

    .line 672
    .end local v0           #count:I
    .end local v3           #i:I
    :cond_0
    iget-object v1, p0, Lorg/zeam/LauncherModel;->mDesktopAppWidgets:Ljava/util/ArrayList;

    .line 673
    .local v1, desktopAppWidgets:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lorg/zeam/LauncherAppWidgetInfo;>;"
    if-eqz v1, :cond_1

    .line 674
    invoke-virtual {v1}, Ljava/util/ArrayList;->size()I

    move-result v0

    .line 675
    .restart local v0       #count:I
    const/4 v3, 0x0

    .restart local v3       #i:I
    :goto_1
    if-lt v3, v0, :cond_4

    .line 679
    .end local v0           #count:I
    .end local v3           #i:I
    :cond_1
    return-void

    .line 663
    .end local v1           #desktopAppWidgets:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lorg/zeam/LauncherAppWidgetInfo;>;"
    .restart local v0       #count:I
    .restart local v3       #i:I
    :cond_2
    invoke-virtual {v2, v3}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Lorg/zeam/ItemInfo;

    iget v5, v4, Lorg/zeam/ItemInfo;->cellX:I

    invoke-virtual {v2, v3}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Lorg/zeam/ItemInfo;

    iget v4, v4, Lorg/zeam/ItemInfo;->spanX:I

    sub-int/2addr v4, v6

    add-int/2addr v4, v5

    .line 664
    iget v5, p0, Lorg/zeam/LauncherModel;->mDesktopColumns:I

    if-ge v4, v5, :cond_3

    invoke-virtual {v2, v3}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Lorg/zeam/ItemInfo;

    iget v5, v4, Lorg/zeam/ItemInfo;->cellY:I

    .line 665
    invoke-virtual {v2, v3}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Lorg/zeam/ItemInfo;

    iget v4, v4, Lorg/zeam/ItemInfo;->spanY:I

    sub-int/2addr v4, v6

    add-int/2addr v4, v5

    iget v5, p0, Lorg/zeam/LauncherModel;->mDesktopRows:I

    if-ge v4, v5, :cond_3

    .line 667
    invoke-virtual {v2, v3}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Lorg/zeam/ItemInfo;

    invoke-direct {p0, p1, p4, v4}, Lorg/zeam/LauncherModel;->addOccupiedCells([[ZILorg/zeam/ItemInfo;)V

    .line 662
    :cond_3
    add-int/lit8 v3, v3, 0x1

    goto :goto_0

    .line 676
    .restart local v1       #desktopAppWidgets:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lorg/zeam/LauncherAppWidgetInfo;>;"
    :cond_4
    invoke-virtual {v1, v3}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Lorg/zeam/ItemInfo;

    invoke-direct {p0, p1, p4, v4}, Lorg/zeam/LauncherModel;->addOccupiedCells([[ZILorg/zeam/ItemInfo;)V

    .line 675
    add-int/lit8 v3, v3, 0x1

    goto :goto_1
.end method

.method findFolderById(J)Lorg/zeam/FolderInfo;
    .locals 2
    .parameter "id"

    .prologue
    .line 597
    iget-object v0, p0, Lorg/zeam/LauncherModel;->mFolders:Ljava/util/HashMap;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lorg/zeam/LauncherModel;->mFolders:Ljava/util/HashMap;

    invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object p0

    .end local p0
    check-cast p0, Lorg/zeam/FolderInfo;

    move-object v0, p0

    :goto_0
    return-object v0

    .restart local p0
    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method getApplicationItemInfoIconOrNull(Landroid/content/pm/PackageManager;Lorg/zeam/ApplicationItemInfo;)Landroid/graphics/drawable/Drawable;
    .locals 3
    .parameter "packageManager"
    .parameter "applicationItemInfo"

    .prologue
    .line 173
    iget-object v1, p2, Lorg/zeam/ApplicationItemInfo;->intent:Landroid/content/Intent;

    const/4 v2, 0x0

    invoke-virtual {p1, v1, v2}, Landroid/content/pm/PackageManager;->resolveActivity(Landroid/content/Intent;I)Landroid/content/pm/ResolveInfo;

    move-result-object v0

    .line 174
    .local v0, resolveInfo:Landroid/content/pm/ResolveInfo;
    if-nez v0, :cond_0

    .line 175
    const/4 v1, 0x0

    .line 177
    :goto_0
    return-object v1

    :cond_0
    iget-object v1, v0, Landroid/content/pm/ResolveInfo;->activityInfo:Landroid/content/pm/ActivityInfo;

    invoke-virtual {v1, p1}, Landroid/content/pm/ActivityInfo;->loadIcon(Landroid/content/pm/PackageManager;)Landroid/graphics/drawable/Drawable;

    move-result-object v1

    goto :goto_0
.end method

.method getFolderById(Landroid/content/Context;J)Lorg/zeam/FolderInfo;
    .locals 18
    .parameter "context"
    .parameter "id"

    .prologue
    .line 845
    invoke-virtual/range {p1 .. p1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v4

    .line 846
    .local v4, cr:Landroid/content/ContentResolver;
    sget-object v5, Lorg/zeam/LauncherSettings$Favorites;->CONTENT_URI:Landroid/net/Uri;

    const/4 v6, 0x0

    .line 847
    const-string v7, "_id=? and (itemType=? or itemType=?)"

    const/4 v8, 0x3

    new-array v8, v8, [Ljava/lang/String;

    const/4 v9, 0x0

    invoke-static/range {p2 .. p3}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;

    move-result-object v10

    aput-object v10, v8, v9

    const/4 v9, 0x1

    .line 848
    const/4 v10, 0x2

    invoke-static {v10}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v10

    aput-object v10, v8, v9

    const/4 v9, 0x2

    .line 849
    const/4 v10, 0x3

    invoke-static {v10}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v10

    aput-object v10, v8, v9

    const/4 v9, 0x0

    .line 846
    invoke-virtual/range {v4 .. v9}, Landroid/content/ContentResolver;->query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v13

    .line 852
    .local v13, cursor:Landroid/database/Cursor;
    :try_start_0
    invoke-interface {v13}, Landroid/database/Cursor;->moveToFirst()Z

    move-result v5

    if-eqz v5, :cond_0

    .line 853
    const-string v5, "itemType"

    invoke-interface {v13, v5}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v15

    .line 854
    .local v15, itemTypeIndex:I
    const-string v5, "title"

    invoke-interface {v13, v5}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v17

    .line 855
    .local v17, titleIndex:I
    const-string v5, "container"

    invoke-interface {v13, v5}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v12

    .line 856
    .local v12, containerIndex:I
    const-string v5, "screen"

    invoke-interface {v13, v5}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v16

    .line 857
    .local v16, screenIndex:I
    const-string v5, "cellX"

    invoke-interface {v13, v5}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v10

    .line 858
    .local v10, cellXIndex:I
    const-string v5, "cellY"

    invoke-interface {v13, v5}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v11

    .line 860
    .local v11, cellYIndex:I
    const/4 v14, 0x0

    .line 861
    .local v14, folderInfo:Lorg/zeam/FolderInfo;
    invoke-interface {v13, v15}, Landroid/database/Cursor;->getInt(I)I

    move-result v5

    packed-switch v5, :pswitch_data_0

    .line 870
    :goto_0
    move-object v0, v13

    move/from16 v1, v17

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v5

    iput-object v5, v14, Lorg/zeam/FolderInfo;->title:Ljava/lang/CharSequence;

    .line 871
    move-wide/from16 v0, p2

    move-object v2, v14

    iput-wide v0, v2, Lorg/zeam/FolderInfo;->id:J

    .line 872
    invoke-interface {v13, v12}, Landroid/database/Cursor;->getInt(I)I

    move-result v5

    int-to-long v5, v5

    iput-wide v5, v14, Lorg/zeam/FolderInfo;->container:J

    .line 873
    move-object v0, v13

    move/from16 v1, v16

    invoke-interface {v0, v1}, Landroid/database/Cursor;->getInt(I)I

    move-result v5

    iput v5, v14, Lorg/zeam/FolderInfo;->screen:I

    .line 874
    invoke-interface {v13, v10}, Landroid/database/Cursor;->getInt(I)I

    move-result v5

    iput v5, v14, Lorg/zeam/FolderInfo;->cellX:I

    .line 875
    invoke-interface {v13, v11}, Landroid/database/Cursor;->getInt(I)I

    move-result v5

    iput v5, v14, Lorg/zeam/FolderInfo;->cellY:I
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 879
    invoke-interface {v13}, Landroid/database/Cursor;->close()V

    move-object v5, v14

    .line 881
    .end local v10           #cellXIndex:I
    .end local v11           #cellYIndex:I
    .end local v12           #containerIndex:I
    .end local v14           #folderInfo:Lorg/zeam/FolderInfo;
    .end local v15           #itemTypeIndex:I
    .end local v16           #screenIndex:I
    .end local v17           #titleIndex:I
    :goto_1
    return-object v5

    .line 863
    .restart local v10       #cellXIndex:I
    .restart local v11       #cellYIndex:I
    .restart local v12       #containerIndex:I
    .restart local v14       #folderInfo:Lorg/zeam/FolderInfo;
    .restart local v15       #itemTypeIndex:I
    .restart local v16       #screenIndex:I
    .restart local v17       #titleIndex:I
    :pswitch_0
    :try_start_1
    move-object/from16 v0, p0

    iget-object v0, v0, Lorg/zeam/LauncherModel;->mFolders:Ljava/util/HashMap;

    move-object v5, v0

    move-object/from16 v0, p0

    move-object v1, v5

    move-wide/from16 v2, p2

    invoke-direct {v0, v1, v2, v3}, Lorg/zeam/LauncherModel;->findOrMakeUserFolder(Ljava/util/HashMap;J)Lorg/zeam/UserFolderInfo;

    move-result-object v14

    .line 864
    goto :goto_0

    .line 866
    :pswitch_1
    move-object/from16 v0, p0

    iget-object v0, v0, Lorg/zeam/LauncherModel;->mFolders:Ljava/util/HashMap;

    move-object v5, v0

    move-object/from16 v0, p0

    move-object v1, v5

    move-wide/from16 v2, p2

    invoke-direct {v0, v1, v2, v3}, Lorg/zeam/LauncherModel;->findOrMakeLiveFolder(Ljava/util/HashMap;J)Lorg/zeam/LiveFolderInfo;
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    move-result-object v14

    goto :goto_0

    .line 878
    .end local v10           #cellXIndex:I
    .end local v11           #cellYIndex:I
    .end local v12           #containerIndex:I
    .end local v14           #folderInfo:Lorg/zeam/FolderInfo;
    .end local v15           #itemTypeIndex:I
    .end local v16           #screenIndex:I
    .end local v17           #titleIndex:I
    :catchall_0
    move-exception v5

    .line 879
    invoke-interface {v13}, Landroid/database/Cursor;->close()V

    .line 880
    throw v5

    .line 879
    :cond_0
    invoke-interface {v13}, Landroid/database/Cursor;->close()V

    .line 881
    const/4 v5, 0x0

    goto :goto_1

    .line 861
    nop

    :pswitch_data_0
    .packed-switch 0x2
        :pswitch_0
        :pswitch_1
    .end packed-switch
.end method

.method isDesktopLoaded()Z
    .locals 1

    .prologue
    .line 183
    iget-object v0, p0, Lorg/zeam/LauncherModel;->mDesktopItems:Ljava/util/ArrayList;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lorg/zeam/LauncherModel;->mDesktopAppWidgets:Ljava/util/ArrayList;

    if-eqz v0, :cond_0

    iget-boolean v0, p0, Lorg/zeam/LauncherModel;->mDesktopItemsLoaded:Z

    if-eqz v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method loadApplications(Lorg/zeam/ApplicationsView;)V
    .locals 2
    .parameter "applicationsView"

    .prologue
    .line 65
    if-nez p1, :cond_0

    .line 150
    :goto_0
    return-void

    .line 68
    :cond_0
    sget-object v0, Lorg/zeam/LauncherModel;->mLoadApplicationsAsyncTask:Landroid/os/AsyncTask;

    if-eqz v0, :cond_1

    .line 69
    sget-object v0, Lorg/zeam/LauncherModel;->mLoadApplicationsAsyncTask:Landroid/os/AsyncTask;

    invoke-virtual {v0}, Landroid/os/AsyncTask;->isCancelled()Z

    move-result v0

    if-nez v0, :cond_1

    .line 71
    sget-object v0, Lorg/zeam/LauncherModel;->mLoadApplicationsAsyncTask:Landroid/os/AsyncTask;

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Landroid/os/AsyncTask;->cancel(Z)Z

    .line 73
    :cond_1
    const/4 v0, 0x0

    sput-object v0, Lorg/zeam/LauncherModel;->mLoadApplicationsAsyncTask:Landroid/os/AsyncTask;

    .line 74
    new-instance v0, Lorg/zeam/LauncherModel$1;

    invoke-direct {v0, p0, p1}, Lorg/zeam/LauncherModel$1;-><init>(Lorg/zeam/LauncherModel;Lorg/zeam/ApplicationsView;)V

    sput-object v0, Lorg/zeam/LauncherModel;->mLoadApplicationsAsyncTask:Landroid/os/AsyncTask;

    .line 149
    sget-object v0, Lorg/zeam/LauncherModel;->mLoadApplicationsAsyncTask:Landroid/os/AsyncTask;

    const/4 v1, 0x0

    new-array v1, v1, [Ljava/lang/Object;

    invoke-virtual {v0, v1}, Landroid/os/AsyncTask;->execute([Ljava/lang/Object;)Landroid/os/AsyncTask;

    goto :goto_0
.end method

.method loadUserItems(ZLorg/zeam/Launcher;Z)V
    .locals 4
    .parameter "isLaunching"
    .parameter "launcher"
    .parameter "localeChanged"

    .prologue
    .line 191
    invoke-static {p2}, Lorg/zeam/PreferencesUtil;->getContentGridRows(Landroid/content/Context;)I

    move-result v1

    iput v1, p0, Lorg/zeam/LauncherModel;->mDesktopRows:I

    .line 192
    invoke-static {p2}, Lorg/zeam/PreferencesUtil;->getContentGridColumns(Landroid/content/Context;)I

    move-result v1

    iput v1, p0, Lorg/zeam/LauncherModel;->mDesktopColumns:I

    .line 194
    if-eqz p1, :cond_0

    invoke-virtual {p0}, Lorg/zeam/LauncherModel;->isDesktopLoaded()Z

    move-result v1

    if-eqz v1, :cond_0

    .line 201
    iget-object v1, p0, Lorg/zeam/LauncherModel;->mDesktopItems:Ljava/util/ArrayList;

    iget-object v2, p0, Lorg/zeam/LauncherModel;->mDesktopAppWidgets:Ljava/util/ArrayList;

    invoke-virtual {p2, v1, v2}, Lorg/zeam/Launcher;->onDesktopItemsLoaded(Ljava/util/ArrayList;Ljava/util/ArrayList;)V

    .line 223
    :goto_0
    return-void

    .line 204
    :cond_0
    iget-object v1, p0, Lorg/zeam/LauncherModel;->mDesktopItemsLoader:Lorg/zeam/LauncherModel$DesktopItemsLoader;

    if-eqz v1, :cond_1

    iget-object v1, p0, Lorg/zeam/LauncherModel;->mDesktopItemsLoader:Lorg/zeam/LauncherModel$DesktopItemsLoader;

    invoke-virtual {v1}, Lorg/zeam/LauncherModel$DesktopItemsLoader;->isRunning()Z

    move-result v1

    if-eqz v1, :cond_1

    .line 208
    iget-object v1, p0, Lorg/zeam/LauncherModel;->mDesktopItemsLoader:Lorg/zeam/LauncherModel$DesktopItemsLoader;

    invoke-virtual {v1}, Lorg/zeam/LauncherModel$DesktopItemsLoader;->stop()V

    .line 210
    :try_start_0
    iget-object v1, p0, Lorg/zeam/LauncherModel;->mDesktopLoaderThread:Ljava/lang/Thread;

    invoke-virtual {v1}, Ljava/lang/Thread;->join()V
    :try_end_0
    .catch Ljava/lang/InterruptedException; {:try_start_0 .. :try_end_0} :catch_0

    .line 219
    :cond_1
    :goto_1
    const/4 v1, 0x0

    iput-boolean v1, p0, Lorg/zeam/LauncherModel;->mDesktopItemsLoaded:Z

    .line 220
    new-instance v1, Lorg/zeam/LauncherModel$DesktopItemsLoader;

    invoke-direct {v1, p0, p2, p3}, Lorg/zeam/LauncherModel$DesktopItemsLoader;-><init>(Lorg/zeam/LauncherModel;Lorg/zeam/Launcher;Z)V

    iput-object v1, p0, Lorg/zeam/LauncherModel;->mDesktopItemsLoader:Lorg/zeam/LauncherModel$DesktopItemsLoader;

    .line 221
    new-instance v1, Ljava/lang/Thread;

    iget-object v2, p0, Lorg/zeam/LauncherModel;->mDesktopItemsLoader:Lorg/zeam/LauncherModel$DesktopItemsLoader;

    const-string v3, "Desktop Items Loader"

    invoke-direct {v1, v2, v3}, Ljava/lang/Thread;-><init>(Ljava/lang/Runnable;Ljava/lang/String;)V

    iput-object v1, p0, Lorg/zeam/LauncherModel;->mDesktopLoaderThread:Ljava/lang/Thread;

    .line 222
    iget-object v1, p0, Lorg/zeam/LauncherModel;->mDesktopLoaderThread:Ljava/lang/Thread;

    invoke-virtual {v1}, Ljava/lang/Thread;->start()V

    goto :goto_0

    .line 211
    :catch_0
    move-exception v1

    move-object v0, v1

    .line 212
    .local v0, e:Ljava/lang/InterruptedException;
    sget-object v1, Lorg/zeam/LauncherModel;->LOG_TAG:Ljava/lang/String;

    const-string v2, "mDesktopLoaderThread didn\'t exit in time"

    invoke-static {v1, v2}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    goto :goto_1
.end method

.method removeDesktopAppWidget(Lorg/zeam/LauncherAppWidgetInfo;)V
    .locals 1
    .parameter "info"

    .prologue
    .line 710
    iget-object v0, p0, Lorg/zeam/LauncherModel;->mDesktopAppWidgets:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->remove(Ljava/lang/Object;)Z

    .line 711
    return-void
.end method

.method removeDesktopItem(Lorg/zeam/ItemInfo;)V
    .locals 1
    .parameter "info"

    .prologue
    .line 700
    iget-object v0, p0, Lorg/zeam/LauncherModel;->mDesktopItems:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->remove(Ljava/lang/Object;)Z

    .line 701
    return-void
.end method

.method declared-synchronized removePackage(Lorg/zeam/ApplicationsView;Ljava/lang/String;)V
    .locals 1
    .parameter "applicationsView"
    .parameter "packageName"

    .prologue
    .line 161
    monitor-enter p0

    :try_start_0
    invoke-virtual {p0, p1}, Lorg/zeam/LauncherModel;->loadApplications(Lorg/zeam/ApplicationsView;)V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 162
    monitor-exit p0

    return-void

    .line 161
    :catchall_0
    move-exception v0

    monitor-exit p0

    throw v0
.end method

.method removeUserFolder(Lorg/zeam/UserFolderInfo;)V
    .locals 3
    .parameter "userFolderInfo"

    .prologue
    .line 787
    iget-object v0, p0, Lorg/zeam/LauncherModel;->mFolders:Ljava/util/HashMap;

    iget-wide v1, p1, Lorg/zeam/UserFolderInfo;->id:J

    invoke-static {v1, v2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/util/HashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;

    .line 788
    return-void
.end method

.method removeUserFolderItem(Lorg/zeam/UserFolderInfo;Lorg/zeam/ItemInfo;)V
    .locals 1
    .parameter "folder"
    .parameter "info"

    .prologue
    .line 783
    iget-object v0, p1, Lorg/zeam/UserFolderInfo;->contents:Ljava/util/ArrayList;

    invoke-virtual {v0, p2}, Ljava/util/ArrayList;->remove(Ljava/lang/Object;)Z

    .line 784
    return-void
.end method

.method unbind()V
    .locals 1

    .prologue
    .line 626
    iget-object v0, p0, Lorg/zeam/LauncherModel;->mDesktopItems:Ljava/util/ArrayList;

    invoke-direct {p0, v0}, Lorg/zeam/LauncherModel;->unbindDrawables(Ljava/util/ArrayList;)V

    .line 627
    iget-object v0, p0, Lorg/zeam/LauncherModel;->mDesktopAppWidgets:Ljava/util/ArrayList;

    invoke-direct {p0, v0}, Lorg/zeam/LauncherModel;->unbindAppWidgetHostViews(Ljava/util/ArrayList;)V

    .line 628
    return-void
.end method

.method declared-synchronized updatePackage(Lorg/zeam/ApplicationsView;Ljava/lang/String;)V
    .locals 1
    .parameter "applicationsView"
    .parameter "packageName"

    .prologue
    .line 167
    monitor-enter p0

    :try_start_0
    invoke-virtual {p0, p1}, Lorg/zeam/LauncherModel;->loadApplications(Lorg/zeam/ApplicationsView;)V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 168
    monitor-exit p0

    return-void

    .line 167
    :catchall_0
    move-exception v0

    monitor-exit p0

    throw v0
.end method
